fix: improve water rendering with darker shallow color and beach zones#1351
Conversation
Water color improvements: - Made shallow water darker (0x1a6080) and closer to deep (0x0a3050) - Added noise-based edge softening in shader to break up harsh shallow/deep boundary - Creates more natural, organic transitions between water depths Beach zone generation: - Added beach zones (4 cells wide) around shallow water features - Beach is at LOW elevation for walkable access from higher terrain - Applies to both circular and rectangular water features - Beach zones don't overwrite existing water, ramps, or low ground This makes water maps more playable by providing walkable shore access. https://claude.ai/code/session_01CEq99bYXB2fmcaLE6H46Sz
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a246caab9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Don't overwrite water, ramps, or existing low ground | ||
| if (!grid.ramps[y][x] && | ||
| grid.features[y][x] !== 'water_deep' && | ||
| grid.features[y][x] !== 'water_shallow' && | ||
| grid.elevation[y][x] > ELEVATION.LOW) { | ||
| grid.elevation[y][x] = ELEVATION.LOW; |
There was a problem hiding this comment.
Avoid creating unclimbable cliffs around beaches
This new beach pass always drops surrounding terrain to ELEVATION.LOW without adding ramps. When shallow water is placed on MID/HIGH terrain (which the map generator allows), the LOW↔MID elevation gap is 80 (see ELEVATION in src/data/maps/core/ElevationMap.ts), while WALKABLE_CLIMB_ELEVATION is ~48 (src/data/pathfinding.config.ts). That means the beach ring becomes a cliff that units can’t climb, so the “walkable access” promise doesn’t hold and you can reduce connectivity around water features. Consider either generating ramps around the beach ring or only lowering cells that are already within walkable climb of LOW.
Useful? React with 👍 / 👎.
Water color improvements:
Beach zone generation:
This makes water maps more playable by providing walkable shore access.
https://claude.ai/code/session_01CEq99bYXB2fmcaLE6H46Sz